package org.csu.mybigpro.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.csu.mybigpro.domain.Score;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ScoreService extends IService<Score> {
    int addScore(Score score);
    Score getScoreById(Long id);
    List<Score> getAllScores();
    int updateScore(Score score);
    int deleteScore(Long id);
    /**
     * 查询某课程的平均分
     */
    BigDecimal getAverageScoreByCourseId(Long courseId);

    /**
     * 查询某课程的成绩分布（分段统计）
     */
    Map<String, BigDecimal> getScoreDistribution(Long courseId);
}
